package com.aiit.controller;

import org.apache.shiro.SecurityUtils;
import org.apache.shiro.subject.Subject;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpSession;

/**
 * ClassName:LogOutController
 * Package:com.aiit.controller
 * Description:
 *
 * @Date:2020/4/22 20:53
 * @Author:xjs
 */
@Controller
public class LogOutController {
   @RequestMapping("/logout")
    public String logout(HttpSession session, Model model) {
        Subject subject = SecurityUtils.getSubject();
        subject.logout();
       // model.addAttribute("msg","安全退出！");
        return "login";
    }

}
